**Replication file for "Sympathizing with the Radical Right" by Ekholm, Bäck and Renström (2021)
**STATA 15.1**

**plug-ins needed**
**ssc install estout, replace
**ssc install univar, replace

**Manipulation Control**
tab m_ctrl s3gr, col chi2
anova m_ctrl s3gr

**Histogram DV (Cont) **

gen temp_cont_dv = likesd_cont-4

twoway (hist temp_cont_dv ,  discrete  leg(off) xscale(r(-3.5 3.5)) percent ///
	fcolor(gray%10) lcolor(black%40)  graphregion(c(white)) xlabel(-3(1)3) ///
	ylabel(0(15)60, nogrid) ytitle("{it:Percentage of Observations}") xtitle("") ///
	name(hist_dv, replace) plotregion(margin(tiny)) )
graph save hist_dv "fig1.gph", replace
graph export fig1.tif, replace

drop temp_cont_dv	
 
**propotion tests**

prtest likesd, by(high) 
prtest likesd, by(above_median_mcp)

** CIPLOTS **

**MANIPULATION CONTROL**

gen treatment = .
replace treatment = 0 if s3gr == 0
replace treatment = 1 if s3gr == 2
replace treatment = 2 if s3gr == 1

label define treatment2 0 "Control Group" 1 "Treatment Group - Low" 2"Treatment Group - High" 
label values treatment  treatment2


ciplot m_ctrl, by(treatment) msymbol(circle) msize(small) mcolor(black) /// 
	scheme(s2mono) graphregion(c(white)) rcapopts(lpattern(dash)) note("") ///
	ytitle("{it:Mean - Manipulation Control}") xtitle("") ///
	name(ciplot_mctrl, replace) 
	
graph save ciplot_mctrl "ciplot_mctrl.gph", replace
graph export mctrl_old.tif, replace	

gen treatment2 = .
replace treatment2 = 0 if s3gr == 1
replace treatment2 = 1 if s3gr == 2
replace treatment2 = 2 if s3gr == 0

label define treatment3 0 "Treatment Group - High" 1 "Treatment Group - Low" 2"Control Group" 
label values treatment  treatment2
**ANOVA**
anova m_ctrl treatment2
**T-TEST CONTROL GROUP & TREATMENT GROUP LOW
ttest m_ctrl if treatment2 == 0  | treatment2 == 1, by (treatment2)
**T-TEST CONTROL GROUP & TREATMENT GROUP HIGH
ttest m_ctrl if treatment2 == 0  | treatment2 == 2, by (treatment2)
**T-TEST TREATMENT GROUP LOW & TREATMENT GROUP HIGH
ttest m_ctrl if treatment2 == 1  | treatment2 == 2, by (treatment2) 

prtest likesd, by(high) 
prtest likesd, by(above_median_mcp)

**FIGURE H1

ciplot likesd, by(high) msymbol(circle) msize(small) mcolor(black) /// 
	scheme(s2mono) graphregion(c(white)) rcapopts(lpattern(dash)) note("") ///
	ytitle("{it:Proportion Liking SD}") xtitle("") ///
	xlabel(2 "{it:Treatment Group - Low & Control Group}" ///
	5 "{it:Treatment Group - High}") name(ciplot_trt, replace) 
graph save ciplot_trt "ciplot_trt.gph", replace
graph export fig2.tif, replace

**FIGURE H2

ciplot likesd, by(above_median_mcp) msymbol(circle) msize(small) mcolor(black) /// 
	scheme(s2mono) graphregion(c(white)) rcapopts(lpattern(dash)) note("") ///
	ytitle("{it:Proportion Liking SD}") xtitle("") ///
	xlabel(2 "{it:Low IMCP (Below Median)}"  5 "{it:High IMCP (Above Median)}") ///
	 name(ciplot_mcp, replace) 
graph save ciplot_mcp "ciplot_mcp.gph", replace
graph export fig3.tif, replace

**OLS Model - Results **
  
eststo: quietly regress likesd high mcp anti_immi left_right sex polint unemp edu
eststo: quietly regress likesd anti_immi high mcp left_right sex polint unemp edu i.high#c.mcp 
esttab using LPM.rtf, replace se label title(Linear Probability Model(LPM)\label{tab1})  
eststo clear

reg likesd i.high##c.mcp anti_immi left_right sex polint unemp edu
margins  high, at(mcp=(1(0.2)7)) 
marginsplot, level(95) recast(line) ciopt(color(%60)) recastci(rarea) ///
	xlabel(1(1)7) xscale(r(1 7)) title("") ///
	xtitle("{it:Internal Motivation to Control Prejudice}") ///
	ytitle("Pr - {it:Liking SD}")  ylabel(0(.1)0.4) graphregion(c(white)) ///
	yline(0) scheme(s2mono) name(lpm_res1, replace) plot2opts(lpattern(longdash)) ///
	addplot(hist mcp ,  bin(6) percent yaxis(2)  xlabel(1(1)7) fcolor(gs14%20)  ///
	ytitle("Percentage of Observations", axis(2))lcolor(black%30) leg(off)  /// 
	yscale(alt axis(2))) ylabel(0(.1)0.4) xlabel(1(1)7) xscale(r(1 7)) ///
	note("(4.1)", position(11))

reg likesd i.high##c.mcp anti_immi left_right sex polint unemp edu
margins r.high, at(mcp=(1(0.1)7))
marginsplot, level(95) recast(line) ciopt(color(%60)) recastci(rarea) xlabel(1(1)7) ///
	xlabel(1(1)7) xscale(r(1 7)) title("") ///
	xtitle("{it:Internal Motivation to Control Prejudice}") ///
	ytitle(" {&Delta}Pr of {it:Liking SD}" "(Contrasts between groups)") ///
	ylabel(0(.1)0.4) graphregion(c(white)) ///
	yline(0) scheme(s2mono) name(lpm_res2, replace) ///
	addplot(hist mcp ,  bin(6) percent yaxis(2)  xlabel(1(1)7) fcolor(gs14%20)  ///
	ytitle("Percentage of Observations", axis(2))lcolor(black%30) leg(off)  /// 
	yscale(alt axis(2))) ylabel(0(.1)0.4) xlabel(1(1)7) xscale(r(1 7)) ///
	note("(4.2)", position(11))


graph combine lpm_res1 lpm_res2,  col(2) xsize(11) ysize(4) ///
	graphregion(margin(zero)) scale(2) name(fig4, replace)

graph save fig4 "lpm_res.gph", replace
graph export fig4.tif, replace 
graph close lpm_res1 lpm_res2

** A1 - Descriptive statistics**

univar likesd mcp anti_immi left_right sex polint unemp edu

** A3 - DIFFERENT CODING (dv)**

	
reg likesd3 i.high##c.mcp anti_immi left_right sex polint unemp edu
margins  high, at(mcp=(1(0.2)7)) 
marginsplot, level(95) recast(line) ciopt(color(%25)) recastci(rarea) ///
	xlabel(1(1)7) xscale(r(1 7)) title("") ///
	xtitle("{it:Internal Motivation to Control Prejudice}") ///
	ytitle("Pr - {it:Liking SD}")  ylabel(0(.1)0.4) graphregion(c(white)) ///
	yline(0) scheme(s2mono) name(lpm_robust3, replace) plot2opts(lpattern(longdash)) ///
	addplot(hist mcp ,  bin(6) percent yaxis(2)  xlabel(1(1)7) fcolor(gray%20)  ///
	ytitle("Percentage of Observations", axis(2))lcolor(black%30) leg(off)  /// 
	yscale(alt axis(2))) ylabel(0(.1)0.4) xlabel(1(1)7) xscale(r(1 7)) ///
	note("(7.1)", position(11))

reg likesd3 i.high##c.mcp anti_immi left_right sex polint unemp edu
margins r.high, at(mcp=(1(0.1)7))
marginsplot, level(95) recast(line) ciopt(color(%25)) recastci(rarea) xlabel(1(1)7) ///
	xlabel(1(1)7) xscale(r(1 7)) title("") ///
	xtitle("{it:Internal Motivation to Control Prejudice}") ///
	ytitle(" {&Delta}Pr of {it:Liking SD}" "(Contrasts between groups)") ///
	ylabel(0(.1)0.4) graphregion(c(white)) ///
	yline(0) scheme(s2mono) name(lpm_robust4, replace) ///
	addplot(hist mcp ,  bin(6) percent yaxis(2)  xlabel(1(1)7) fcolor(gray%20)  ///
	ytitle("Percentage of Observations", axis(2))lcolor(black%30) leg(off)  /// 
	yscale(alt axis(2))) ylabel(0(.1)0.4) xlabel(1(1)7) xscale(r(1 7)) ///
	note("(7.2)", position(11))
	
reg likesd2 i.high##c.mcp anti_immi left_right sex polint unemp edu
margins  high, at(mcp=(1(0.2)7)) 
marginsplot, level(95) recast(line) ciopt(color(%25)) recastci(rarea) ///
	xlabel(1(1)7) xscale(r(1 7)) title("") ///
	xtitle("{it:Internal Motivation to Control Prejudice}") ///
	ytitle("Pr - {it:Liking SD}")  ylabel(0(.1)0.4) graphregion(c(white)) ///
	yline(0) scheme(s2mono) name(lpm_robust1, replace) plot2opts(lpattern(longdash)) ///
	addplot(hist mcp ,  bin(6) percent yaxis(2)  xlabel(1(1)7) fcolor(gray%20)  ///
	ytitle("Percentage of Observations", axis(2))lcolor(black%30) leg(off)  /// 
	yscale(alt axis(2))) ylabel(0(.1)0.4) xlabel(1(1)7) xscale(r(1 7)) ///
	note("(7.3)", position(11))

reg likesd2 i.high##c.mcp anti_immi left_right sex polint unemp edu
margins r.high, at(mcp=(1(0.1)7))
marginsplot, level(95) recast(line) ciopt(color(%25)) recastci(rarea) xlabel(1(1)7) ///
	xlabel(1(1)7) xscale(r(1 7)) title("") ///
	xtitle("{it:Internal Motivation to Control Prejudice}") ///
	ytitle(" {&Delta}Pr of {it:Liking SD}" "(Contrasts between groups)") ///
	ylabel(0(.1)0.4) graphregion(c(white)) ///
	yline(0) scheme(s2mono) name(lpm_robust2, replace) ///
	addplot(hist mcp ,  bin(6) percent yaxis(2)  xlabel(1(1)7) fcolor(gray%20)  ///
	ytitle("Percentage of Observations", axis(2))lcolor(black%30) leg(off)  /// 
	yscale(alt axis(2))) ylabel(0(.1)0.4) xlabel(1(1)7) xscale(r(1 7)) ///
	note("(7.4)", position(11))

drop if likesd_cont == 4		
	
reg likesd2 i.high##c.mcp anti_immi left_right sex polint unemp edu
margins  high, at(mcp=(1(0.2)7)) 
marginsplot, level(95) recast(line) ciopt(color(%25)) recastci(rarea) ///
	xlabel(1(1)7) xscale(r(1 7)) title("") ///
	xtitle("{it:Internal Motivation to Control Prejudice}") ///
	ytitle("Pr - {it:Liking SD}")  ylabel(0(.1)0.4) graphregion(c(white)) ///
	yline(0) scheme(s2mono) name(lpm_robust5, replace) plot2opts(lpattern(longdash)) ///
	addplot(hist mcp ,  bin(6) percent yaxis(2)  xlabel(1(1)7) fcolor(gray%20)  ///
	ytitle("Percentage of Observations", axis(2))lcolor(black%30) leg(off)  /// 
	yscale(alt axis(2))) ylabel(0(.1)0.4) xlabel(1(1)7) xscale(r(1 7)) ///
	note("(7.5)", position(11))

reg likesd2 i.high##c.mcp anti_immi left_right sex polint unemp edu
margins r.high, at(mcp=(1(0.1)7))
marginsplot, level(95) recast(line) ciopt(color(%25)) recastci(rarea) xlabel(1(1)7) ///
	xlabel(1(1)7) xscale(r(1 7)) title("") ///
	xtitle("{it:Internal Motivation to Control Prejudice}") ///
	ytitle(" {&Delta}Pr of {it:Liking SD}" "(Contrasts between groups)") ///
	ylabel(0(.1)0.4) graphregion(c(white)) ///
	yline(0) scheme(s2mono) name(lpm_robust6, replace) ///
	addplot(hist mcp ,  bin(6) percent yaxis(2)  xlabel(1(1)7) fcolor(gray%20)  ///
	ytitle("Percentage of Observations", axis(2))lcolor(black%30) leg(off)  /// 
	yscale(alt axis(2))) ylabel(0(.1)0.4) xlabel(1(1)7) xscale(r(1 7)) ///
	note("(7.6)", position(11))	

graph combine  lpm_robust3 lpm_robust4 lpm_robust1 lpm_robust2 lpm_robust5 lpm_robust6,  col(2) row(6) ysize(2) xsize(2) ///
	graphregion(margin(zero)) scale (0.8) name(fig7, replace)	
	

graph save fig7 "fig7.gph", replace
graph export fig7.tif, replace 


use data02.dta, clear


eststo: quietly regress likesd3 anti_immi high mcp left_right sex polint unemp edu i.high#c.mcp 
eststo: quietly regress likesd2 anti_immi high mcp left_right sex polint unemp edu i.high#c.mcp 

drop if likesd_cont == 4		

eststo: quietly regress likesd2 anti_immi high mcp left_right sex polint unemp edu i.high#c.mcp 
esttab using a3.rtf, replace se label title(Linear Probability Model(LPM))  
eststo clear

use data02.dta, clear
 
** A4 - Logit Model (Robustness Check)**

eststo: quietly logit likesd high mcp anti_immi left_right sex polint unemp edu
eststo: quietly logit likesd anti_immi high mcp left_right sex polint unemp edu i.high#c.mcp 
esttab using logit.rtf, replace se label title(Logit Model(Logit)\label{tab1})  
eststo clear

logit likesd i.high##c.mcp anti_immi left_right sex polint unemp edu
margins  high, at(mcp=(1(0.2)7))
marginsplot, level(95) recast(line) ciopt(color(%60)) recastci(rarea) xlabel(1(1)7) ///
	xlabel(1(1)7) xscale(r(1 7)) title("") ///
	xtitle("{it:Internal Motivation to Control Prejudice}") ///
	ytitle("Pr - {it:Liking SD}")  ylabel(0(.1)0.4) graphregion(c(white)) ///
	scheme(s2mono) name(A4_logit1, replace) plot2opts(lpattern(longdash)) ///
	addplot(hist mcp ,  bin(6) percent yaxis(2)  xlabel(1(1)7) fcolor(gray%20)  ///
	ytitle("Percentage of Observations", axis(2))lcolor(black%30) leg(off)  /// 
	yscale(alt axis(2))) ylabel(0(.1)0.4) xlabel(1(1)7) xscale(r(1 7)) ///
	note("(8.1)", position(11))
 
logit likesd i.high##c.mcp anti_immi left_right sex polint unemp edu
margins  r.high, at(mcp=(1(0.2)7))
marginsplot, level(95) recast(line) ciopt(color(%60)) recastci(rarea) xlabel(1(1)7) ///
	xlabel(1(1)7) xscale(r(1 7)) title("")  ///
	xtitle("{it:Internal Motivation to Control Prejudice}") ///
	ytitle(" {&Delta}Pr of {it:Liking SD}" "(Contrasts between groups)") ///
	graphregion(c(white)) ///
	yline(0) scheme(s2mono) name(A4_logit2, replace) ///
	addplot(hist mcp ,  bin(6) percent yaxis(2)  xlabel(1(1)7) fcolor(gray%20)  ///
	ytitle("Percentage of Observations", axis(2))lcolor(black%30) leg(off)  /// 
	yscale(alt axis(2)))  xlabel(1(1)7) xscale(r(1 7)) ///
	note("(8.2)", position(11)) 

graph combine A4_logit1 A4_logit2,  col(2) xsize(11) ysize(4) ///
	graphregion(margin(zero)) scale(2) name(fig8, replace)
	
graph save fig8 "fig8.gph", replace
graph export fig8.tif, replace 	
graph close A4_logit1 A4_logit2
 
 **A5 - LPM SEPERATING LOW TREATMENT AND CONTROL**

eststo: quietly regress likesd i.group mcp anti_immi left_right sex polint unemp edu
eststo: quietly regress likesd anti_immi i.group mcp left_right sex polint unemp edu i.group#c.mcp 
esttab using A5.rtf, replace se label title(Linear Probability Model(LPM)\label{tab1})  
eststo clear

reg likesd i.group##c.mcp anti_immi left_right sex polint unemp edu
margins  group, at(mcp=(1(0.2)7)) 
marginsplot, level(95) recast(line) ciopt(color(%60)) recastci(rarea) ///
	xlabel(1(1)7) xscale(r(1 7)) title("") ///
	xtitle("{it:Internal Motivation to Control Prejudice}") ///
	ytitle("Pr - {it:Liking SD}")  ylabel(0(.1)0.4) graphregion(c(white)) ///
	yline(0) scheme(s2mono) name(A5_1, replace) plot2opts(lpattern(longdash)) ///
	plot3opts(lpattern(dash)) ///
	addplot(hist mcp ,  bin(6) percent yaxis(2)  xlabel(1(1)7) fcolor(gray%20)  ///
	ytitle("Percentage of Observations", axis(2))lcolor(black%30) leg(off)  /// 
	yscale(alt axis(2))) ylabel(0(.1)0.4) xlabel(1(1)7) xscale(r(1 7)) ///
	note("(9.1)", position(11))
	
reg likesd i.group##c.mcp anti_immi left_right sex polint unemp edu
margins  r.group, at(mcp=(1(0.2)7)) 
marginsplot, level(95) recast(line) ciopt(color(%60)) recastci(rarea) xlabel(1(1)7) ///
	xlabel(1(1)7) xscale(r(1 7)) title("")  ///
	xtitle("{it:Internal Motivation to Control Prejudice}") ///
	ytitle(" {&Delta}Pr of {it:Liking SD}" "(Contrasts between groups)") ///
	graphregion(c(white)) plot2opts(lpattern(longdash)) ///
	yline(0) scheme(s2mono) name(A5_2, replace) ///
	addplot(hist mcp ,  bin(6) percent yaxis(2)  xlabel(1(1)7) fcolor(gray%20)  ///
	ytitle("Percentage of Observations", axis(2))lcolor(black%30) leg(off)  /// 
	yscale(alt axis(2)))  xlabel(1(1)7) xscale(r(1 7)) ///
	note("(9.2)", position(11)) 
	
graph combine A5_1 A5_2,  col(2) xsize(11) ysize(4) ///
	graphregion(margin(zero)) scale(2) name(fig9, replace)	
 
graph save fig9 "fig9.gph", replace
graph export fig9.tif, replace
graph close A5_1 A5_2 	

**A6**
eststo: quietly regress likesd_cont i.high mcp anti_immi left_right sex polint unemp edu
eststo: quietly regress likesd_cont anti_immi i.high mcp left_right sex polint unemp edu i.high#c.mcp 
esttab using A6.rtf, replace se label title(OLS - DV: Liking SD (continuous)\label{tab1})  
eststo clear

reg likesd_cont i.high##c.mcp anti_immi left_right sex polint unemp edu
margins  high, at(mcp=(1(0.2)7)) 
marginsplot, level(95) recast(line) ciopt(color(%60)) recastci(rarea) ///
	xlabel(1(1)7) title("") xtitle("{it:Internal Motivation to Control Prejudice}")  ///
	ylabel(1.5(0.5)4, nogrid) ytitle("Predictive Margins of {it:Liking SD}") ///
	graphregion(c(white)) yline(0) plot2opts(lpattern(longdash)) ///
	scheme(s2mono) name(figure_cont1, replace) ///
	addplot(hist mcp ,  bin(6) percent yaxis(2)  ///
	ytitle("Percentage of Observations", axis(2)) fcolor(gray%20)  ///
	lcolor(black%30) xlabel(1(1)7) leg(off) yscale(alt axis(2))) ///
	note("(10.1)", position(11))
 
reg likesd_cont i.high##c.mcp anti_immi left_right sex polint unemp edu
margins  r.high, at(mcp=(1(0.2)7)) 
marginsplot, level(95) recast(line) ciopt(color(%60)) recastci(rarea) ///
	xlabel(1(1)7) title("") xtitle("{it:Internal Motivation to Control Prejudice}") ///
	ylabel(-1.0(0.5)1.5, nogrid) ///
	ytitle(" {&Delta}Predictive Margins of {it:Liking SD}" ///
	"(Contrasts between groups)") ylabel(0(.1)0.4) ///
	graphregion(c(white)) yline(0) scheme(s2mono) name(figure_cont2, replace) ///
	addplot(hist mcp ,  bin(6) percent yaxis(2) ///
	ytitle("Percentage of Observations", axis(2)) fcolor(gray%20) ///
	lcolor(black%30) xlabel(1(1)7) leg(off) yscale(alt axis(2))) ///
	note("(10.2)", position(11)) 
						 
graph combine figure_cont1 figure_cont2,  col(2) xsize(11) ysize(4) ///
	graphregion(margin(zero)) scale(2) name(fig10, replace)

graph save fig10 "fig10.gph", replace
graph export fig10.tif, replace
graph close figure_cont1 figure_cont2
 
**OLS with 3-way INTERACTION (ANTI-IMMI)**
eststo: quietly regress likesd anti_immi i.high mcp left_right sex polint unemp edu
eststo: quietly regress likesd anti_immi i.high mcp left_right sex polint unemp edu i.high#c.mcp i.high#c.anti_immi c.anti_immi#c.mcp c.anti_immi#c.mcp#i.high
esttab using A7.rtf, replace se label title(Three-way interaction model (LPM))  
eststo clear		

regress likesd anti_immi i.high mcp left_right sex polint unemp edu i.high#c.mcp i.high#c.anti_immi c.anti_immi#c.mcp c.anti_immi#c.mcp#i.high
margins  high, at(mcp=(1(0.2)7) anti_immi=(1 4 7)) 
marginsplot, level(95) recast(line) ciopt(color(%25)) recastci(rarea) xlabel(1(1)7) ///
	xlabel(1(0.2)7) xscale(r(1 7)) title("") ///
	xtitle("{it:Internal Motivation to Control Prejudice}") ///
	ytitle("Pr - {it:Liking SD}")  ylabel(0(.1)0.4) graphregion(c(white)) ///
	yline(0) scheme(s2mono) name(lpm_interact1, replace) plot1opts(lpattern(dash)) ///
	plot2opts(lpattern(longdash)) plot3opts(lpattern(dash_dot)) plot4opts(lpattern(longdash_dot)) plot5opts(lpattern(_-_)) plot6opts(lpattern(solid)) ///
	ci1opt(color(%25))ci2opt(color(%25)) ci3opt(color(%25)) ci4opt(color(%25)) ci5opt(color(%25)) ci6opt(color(%25)) ///
	addplot(hist mcp ,  bin(6) percent yaxis(2)  xlabel(1(1)7) fcolor(gray%20)  ///
	ytitle("Percentage of Observations", axis(2))lcolor(black%30)   /// 
	yscale(alt axis(2))) ylabel(0(.1)0.4) xlabel(1(1)7) xscale(r(1 7)) leg(off) ///
	note("(11.1)", position(11))
	
regress likesd anti_immi i.high mcp left_right sex polint unemp edu i.high#c.mcp i.high#c.anti_immi c.anti_immi#c.mcp c.anti_immi#c.mcp#i.high
margins r.high, at(mcp =(1(0.1)7) anti_immi =(1 4 7))
marginsplot,  level(95) recast(line) ciopt(color(%25)) recastci(rarea) xlabel(1(1)7) ///
	xlabel(1(1)7) xscale(r(1 7)) title("")  ///
	xtitle("{it:Internal Motivation to Control Prejudice}") ///
	ytitle("{&Delta}Pr of {it:Liking SD} (Contrasts" "between groups at levels" "of {it:Anti-Immigration Attitude})") ///
	graphregion(c(white)) plot1opts(lpattern(dash)) plot2opts(lpattern(longdash_dot)) ///
	ci1opt(color(%25))ci2opt(color(%25)) ci3opt(color(%25)) yline(0) scheme(s2mono) name(lpm_interact2, replace) ///
	addplot(hist mcp ,  bin(6) percent yaxis(2)  xlabel(1(1)7) fcolor(gray%20)  ///
	ytitle("Percentage of Observations", axis(2))lcolor(black%30)  /// 
	yscale(alt axis(2)))  xlabel(1(1)7) xscale(r(1 7)) yline(0) leg(off) ///
	note("(11.1)", position(11)) 
	

graph combine lpm_interact1 lpm_interact2,  col(2) xsize(11) ysize(4) ///
	graphregion(margin(zero)) scale(2) name(fig11, replace)

graph save fig11 "fig_interact.gph", replace
graph export fig11.tif, replace 
graph close lpm_interact1 lpm_interact2	

gen mcp_interaction = mcp <= 4.25
gen anti_immi_interaction = anti_immi >= 4
gen n = .
replace n = 1 if anti_immi_interaction == 1 & mcp_interaction == 1

replace n = 0 if n != 1
replace n = . if mcp == .
replace n = . if anti_immi ==.

tab n 
drop n



 
 **A9 - VOTE INTENTION SD**
eststo: quietly regress votesd high mcp anti_immi left_right sex polint unemp edu
eststo: quietly regress votesd anti_immi high mcp left_right sex polint unemp edu i.high#c.mcp 
esttab using A9.rtf, replace se label title(Linear Probability Model(LPM)\label{tab1})  
eststo clear
 
reg votesd i.high##c.mcp anti_immi left_right sex polint unemp edu
margins  high, at(mcp=(1(0.2)7)) 
marginsplot, level(95) recast(line) ciopt(color(%60)) recastci(rarea) xlabel(1(1)7) ///
	xlabel(1(1)7) xscale(r(1 7)) title("") ///
	xtitle("{it:Internal Motivation to Control Prejudice}") ///
	ytitle("Pr - {it:Vote Intention SD}")  ylabel(0(.1)0.4) graphregion(c(white)) ///
	yline(0) scheme(s2mono) name(A9_1, replace) plot2opts(lpattern(longdash)) ///
	addplot(hist mcp ,  bin(6) percent yaxis(2)  xlabel(1(1)7) fcolor(gray%20)  ///
	ytitle("Percentage of Observations", axis(2))lcolor(black%30) leg(off)  /// 
	yscale(alt axis(2))) ylabel(0(.1)0.4) xlabel(1(1)7) xscale(r(1 7)) ///
	note("(A9.1)", position(11))
 
reg votesd i.high##c.mcp anti_immi left_right sex polint unemp edu
margins r.high, at(mcp=(1(0.2)7))
marginsplot, level(95) recast(line) ciopt(color(%60)) recastci(rarea) xlabel(1(1)7) ///
	xlabel(1(1)7) xscale(r(1 7)) title("") ///
	xtitle("{it:Internal Motivation to Control Prejudice}") ///
	ytitle(" {&Delta}Pr of {it:Vote Intention SD}" "(Contrasts between groups)") ///
	ylabel(0(.1)0.4) graphregion(c(white)) ///
	yline(0) scheme(s2mono) name(A9_2, replace) ///
	addplot(hist mcp ,  bin(6) percent yaxis(2)  xlabel(1(1)7) fcolor(gray%20)  ///
	ytitle("Percentage of Observations", axis(2))lcolor(black%30) leg(off)  /// 
	yscale(alt axis(2))) ylabel(0(.1)0.4) xlabel(1(1)7) xscale(r(1 7)) ///
	note("(A9.2)", position(11))
	
graph combine A9_1 A9_2,  col(2) xsize(11) ysize(4) ///
	graphregion(margin(zero)) scale(2) name(A9, replace)

graph save A9 "A7.gph", replace
graph export fig12.tif, replace
graph close A9_1 A9_2	

graph close
